<?php
// @formatter:off
/**
 * @file tools.php
 * @author Alejandro Dario Simi
 * @date $Date: 2013-10-27 18:31:53 +0000 (Sun, 27 Oct 2013) $
 *
 * $Id: tools.php 110 2013-10-27 18:31:53Z daemonraco@gmail.com $
 * $URL: http://wcomix.googlecode.com/svn/trunk/services/users/tools.php $
 */
// @formatter:on

function SendEmail($to, $subject, $message) {
	global $wcSite;

	$subject = "wcomix: {$subject}";

	$headers[] = "From: {$wcSite["email"]}";
	$headers[] = "Reply-To: noreplay@{$_SERVER["SERVER_NAME"]}";
	$headers[] = "X-Mailer: PHP/".phpversion();
	$headers[] = "MIME-Version: 1.0";
	$headers[] = "Content-Type: text/html;";

	return mail($to, $subject, $message, implode("\r\n", $headers));
}
?>